package com.bookm.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

@Data
@TableName("tb_user")
public class User {

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField("name")
    private String username;
    @TableField(value = "password",select = false)
    private String password;
    @TableField("age")
    private Integer age;
    @TableField("tel")
    private String tel;

    @TableField("deleted")
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;

    @TableField(exist = false)
    String phone;
    @Version
    private Integer version;
//    @TableField(value = "create_time",fill= FieldFill.INSERT)
//    private Date create_time;
    public User() {
    }

    public User(Long id, String username, String password, Integer age, String tel, Integer deleted) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.age = age;
        this.tel = tel;
        this.deleted = deleted;
    }

    public User(Long id, String username, String password, Integer age, String tel) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.age = age;
        this.tel = tel;
    }
}
